package com.wisdomparking.dao;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.wisdomparking.bean.VehicleInfo;
import com.wisdomparking.dao.mapper.VehicleInfoMapper;

@Component
public class VehicleInfoDao implements VehicleInfoMapper {
	
	@Autowired VehicleInfoMapper vehicleInfoMapper;
	
	@Transactional
	@Override
	public int deleteByPrimaryKey(Integer id) {
		return vehicleInfoMapper.deleteByPrimaryKey(id);
	}
	
	@Transactional
	@Override
	public int insert(VehicleInfo record) {
		return vehicleInfoMapper.insert(record);
	}
	
	@Transactional
	@Override
	public int insertSelective(VehicleInfo record) {
		return vehicleInfoMapper.insertSelective(record);
	}
	
	@Override
	public VehicleInfo selectByPrimaryKey(Integer id) {
		return vehicleInfoMapper.selectByPrimaryKey(id);
	}
	
	@Override
	public VehicleInfo selectByPlateNumber(String plateNumber) {
		return vehicleInfoMapper.selectByPlateNumber(plateNumber);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKeySelective(VehicleInfo record) {
		return vehicleInfoMapper.updateByPrimaryKeySelective(record);
	}
	
	@Transactional
	@Override
	public int updateByPrimaryKey(VehicleInfo record) {
		return vehicleInfoMapper.updateByPrimaryKey(record);
	}
	
	@Override
	public List<VehicleInfo> getVehicleInfoList(Map<String, Object> map) {
		return vehicleInfoMapper.getVehicleInfoList(map);
	}

	@Override
	public long getCountByVehicleInfo(Map<String, Object> map) {
		return vehicleInfoMapper.getCountByVehicleInfo(map);
	}

}
